package hermesV3.services.TupleSpace.examples;

import hermesV3.services.TupleSpace.Tuple;
import hermesV3.services.TupleSpace.TupleException;

/**

 * @author Ambruoso Luigi
 * @author Addeo Vincenzo
 * 
 */

public class Cordinate extends Tuple{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static String CORDINATE="Cordinate";
	public static String X="x";
	public static String Y="y";
	public static String Z="z";
	
	public Cordinate() {
		super();
		this.addKey(CORDINATE);
		
		try {
			this.addField(X, null);
			this.addField(Y, null);
			this.addField(Z, null);
			
		} catch (TupleException e) {
			
			e.printStackTrace();
		}
		
		
	}
	public void setX(Integer n){
		try {
			this.setField(X, n);
		} catch (TupleException e) {
			
			e.printStackTrace();
		}
	}
	public Integer getX() {
		Integer I = null;
		try {
			I= (Integer) this.getField(X);
		} catch (TupleException e) {
			
			e.printStackTrace();
		}
		return I;
		
	}
	public void setY(Integer n){
		try {
			this.setField(Y, n);
		} catch (TupleException e) {
			
			e.printStackTrace();
		}
	}
	public Integer getY(){
		Integer I = null;
		try {
			I= (Integer) this.getField(Y);
		} catch (TupleException e) {
			
			e.printStackTrace();
		}
		return I;
	
	}
	public void setZ(Integer n){
		try {
			this.setField(Z, n);
		} catch (TupleException e) {
			
			e.printStackTrace();
		}
	}
	public Integer getZ(){
		Integer I = null;
		try {
			I= (Integer) this.getField(Z);
		} catch (TupleException e) {
			
			e.printStackTrace();
		}
		return I;
	}
	
}
